import http from "@/http/index.ts"
import {CompanyCustomer,CompanyCustomerListParam} from '@/api/companyCustomer/type.ts'


// 新增公司客户
export const addApi = (data: CompanyCustomer) => {
    return http.post("/companyCustomer/createCompanyCustomer", data)
}

// 分页条件查询列表
export const getListApi = (data:CompanyCustomerListParam) => {
    return http.get("/companyCustomer/getCompanyCustomerList",data)
}

// 列表
export const getSimpleCustomer = () => {
    return http.get("/companyCustomer/simpleList",)
}

// 编辑公司客户
export const editApi = (data: CompanyCustomer) => {
    return http.put("/companyCustomer/updateCompanyCustomer", data)
}
// 删除公司客户
export const deleteApi = (id: number) => {
    return http.delete(`/companyCustomer/deleteCompanyCustomer/${id}`)
}